package com.gitee.wsl.text.dictomaton.levenshtein

internal class ParametricTransitions2 : ParametricTransitions {
    
    override fun transition(parametricState: Int, offset: Int, characteristicVector: Int, len: Int): Int {
        var parToState = -1
        var parToOffset = 0

        if (offset == len) {
            if (parametricState < 3) {
                val pos = characteristicVector * 3 + parametricState
                parToState = d_toStates[0][pos]
                parToOffset = d_increments[0][pos]
            }
        } else if (offset == len - 1) {
            if (parametricState < 5) {
                val pos = characteristicVector * 5 + parametricState
                parToState = d_toStates[1][pos]
                parToOffset = d_increments[1][pos]
            }
        } else if (offset == len - 2) {
            if (parametricState < 11) {
                val pos = characteristicVector * 11 + parametricState
                parToState = d_toStates[2][pos]
                parToOffset = d_increments[2][pos]
            }
        } else if (offset == len - 3) {
            if (parametricState < 21) {
                val pos = characteristicVector * 21 + parametricState
                parToState = d_toStates[3][pos]
                parToOffset = d_increments[3][pos]
            }
        } else if (offset == len - 4) {
            if (parametricState < 30) {
                val pos = characteristicVector * 30 + parametricState
                parToState = d_toStates[4][pos]
                parToOffset = d_increments[4][pos]
            }
        } else if (offset <= len - 5) {
            if (parametricState < 30) {
                val pos = characteristicVector * 30 + parametricState
                parToState = d_toStates[5][pos]
                parToOffset = d_increments[5][pos]
            }
        }

        if (parToState == -1) return -1

        return ((offset + parToOffset) * d_nStates) + parToState
    }

    
    override fun nParametricStates(): Int {
        return d_nStates
    }

    
    override fun maxOffsetErrors(parametricState: Int): Int {
        return d_maxOffsetErrors[parametricState]
    }

    
    override fun nEditOperations(): Int {
        return 2
    }

    private val d_toStates: Array<IntArray> = arrayOf<IntArray>(
        intArrayOf(2, -1, 1),
        intArrayOf(3, -1, 4, 4, -1, 0, 1, 2, 2, 1),
        intArrayOf(
            3,
            -1,
            4,
            10,
            -1,
            1,
            4,
            -1,
            10,
            10,
            -1,
            8,
            -1,
            10,
            5,
            1,
            1,
            10,
            -1,
            5,
            10,
            1,
            0,
            1,
            2,
            2,
            1,
            4,
            2,
            1,
            2,
            2,
            1,
            0,
            1,
            2,
            3,
            4,
            4,
            2,
            1,
            3,
            2,
            4
        ),
        intArrayOf(
            3,
            -1,
            4,
            10,
            -1,
            4,
            4,
            -1,
            13,
            13,
            -1,
            -1,
            -1,
            -1,
            4,
            1,
            4,
            10,
            1,
            -1,
            4,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            -1,
            -1,
            1,
            12,
            1,
            4,
            13,
            1,
            1,
            2,
            8,
            -1,
            10,
            5,
            1,
            4,
            10,
            -1,
            5,
            13,
            1,
            -1,
            1,
            1,
            10,
            1,
            10,
            5,
            4,
            -1,
            4,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            -1,
            1,
            4,
            13,
            1,
            10,
            5,
            4,
            1,
            2,
            0,
            1,
            2,
            2,
            1,
            10,
            2,
            1,
            6,
            6,
            1,
            1,
            1,
            1,
            2,
            7,
            2,
            2,
            7,
            1,
            10,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            1,
            1,
            7,
            6,
            7,
            2,
            6,
            7,
            7,
            5,
            0,
            1,
            2,
            3,
            4,
            10,
            2,
            1,
            3,
            6,
            4,
            1,
            4,
            4,
            2,
            7,
            2,
            3,
            10,
            1,
            10,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            1,
            4,
            10,
            6,
            7,
            2,
            3,
            10,
            7,
            5
        ),
        intArrayOf(
            3,
            -1,
            4,
            10,
            -1,
            4,
            4,
            -1,
            13,
            13,
            -1,
            -1,
            -1,
            -1,
            4,
            4,
            4,
            10,
            4,
            -1,
            10,
            4,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            3,
            -1,
            4,
            10,
            -1,
            10,
            4,
            -1,
            27,
            27,
            -1,
            1,
            1,
            1,
            22,
            2,
            22,
            26,
            2,
            1,
            5,
            10,
            -1,
            1,
            1,
            1,
            -1,
            1,
            -1,
            -1,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            -1,
            -1,
            1,
            12,
            4,
            4,
            13,
            4,
            1,
            2,
            2,
            -1,
            -1,
            1,
            -1,
            1,
            1,
            -1,
            1,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            1,
            1,
            4,
            23,
            2,
            22,
            27,
            2,
            4,
            3,
            2,
            -1,
            1,
            4,
            1,
            1,
            4,
            -1,
            1,
            8,
            -1,
            10,
            5,
            1,
            4,
            10,
            -1,
            5,
            13,
            1,
            -1,
            1,
            1,
            10,
            4,
            10,
            5,
            10,
            -1,
            10,
            4,
            1,
            1,
            -1,
            -1,
            1,
            1,
            -1,
            -1,
            8,
            -1,
            10,
            5,
            1,
            10,
            10,
            -1,
            21,
            27,
            1,
            1,
            7,
            7,
            26,
            2,
            26,
            21,
            5,
            1,
            5,
            10,
            1,
            7,
            1,
            1,
            1,
            7,
            -1,
            -1,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            -1,
            1,
            4,
            13,
            4,
            10,
            5,
            10,
            1,
            2,
            2,
            1,
            1,
            1,
            -1,
            4,
            4,
            -1,
            1,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            1,
            7,
            10,
            27,
            2,
            26,
            21,
            5,
            4,
            3,
            2,
            1,
            7,
            4,
            1,
            4,
            10,
            -1,
            1,
            0,
            1,
            2,
            2,
            1,
            10,
            2,
            1,
            6,
            6,
            1,
            1,
            1,
            1,
            2,
            19,
            2,
            2,
            19,
            1,
            13,
            10,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            0,
            1,
            2,
            2,
            1,
            13,
            2,
            1,
            14,
            14,
            1,
            11,
            11,
            11,
            16,
            15,
            16,
            16,
            15,
            11,
            18,
            13,
            1,
            11,
            11,
            11,
            1,
            11,
            1,
            1,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            1,
            1,
            7,
            6,
            19,
            2,
            6,
            19,
            7,
            5,
            5,
            1,
            1,
            7,
            1,
            7,
            7,
            1,
            7,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            11,
            11,
            19,
            14,
            15,
            16,
            14,
            15,
            19,
            20,
            5,
            1,
            11,
            19,
            11,
            7,
            19,
            1,
            7,
            0,
            1,
            2,
            3,
            4,
            10,
            2,
            1,
            3,
            6,
            4,
            1,
            4,
            4,
            2,
            19,
            2,
            3,
            13,
            1,
            13,
            10,
            4,
            4,
            1,
            1,
            4,
            4,
            1,
            1,
            0,
            1,
            2,
            3,
            4,
            13,
            2,
            1,
            17,
            14,
            4,
            11,
            12,
            12,
            16,
            15,
            16,
            17,
            18,
            11,
            18,
            13,
            4,
            12,
            11,
            11,
            4,
            12,
            1,
            1,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            1,
            4,
            10,
            6,
            19,
            2,
            3,
            13,
            7,
            5,
            5,
            4,
            4,
            7,
            1,
            10,
            10,
            1,
            7,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            5,
            4,
            12,
            19,
            11,
            10,
            13,
            1,
            7
        ),
        intArrayOf(
            3,
            -1,
            4,
            10,
            -1,
            4,
            4,
            -1,
            13,
            13,
            -1,
            -1,
            -1,
            -1,
            4,
            4,
            4,
            10,
            4,
            -1,
            10,
            4,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            -1,
            3,
            -1,
            4,
            10,
            -1,
            4,
            4,
            -1,
            13,
            13,
            -1,
            -1,
            -1,
            -1,
            4,
            10,
            4,
            10,
            10,
            -1,
            13,
            12,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            3,
            -1,
            4,
            10,
            -1,
            10,
            4,
            -1,
            27,
            27,
            -1,
            1,
            1,
            1,
            22,
            2,
            22,
            26,
            2,
            1,
            5,
            10,
            -1,
            1,
            1,
            1,
            -1,
            1,
            -1,
            -1,
            3,
            -1,
            4,
            10,
            -1,
            10,
            4,
            -1,
            27,
            27,
            -1,
            1,
            1,
            1,
            22,
            2,
            22,
            26,
            2,
            1,
            5,
            13,
            1,
            4,
            4,
            4,
            1,
            4,
            1,
            1,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            -1,
            -1,
            1,
            12,
            4,
            4,
            13,
            4,
            1,
            2,
            2,
            -1,
            -1,
            1,
            -1,
            1,
            1,
            -1,
            1,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            -1,
            -1,
            1,
            12,
            10,
            4,
            13,
            10,
            1,
            6,
            6,
            1,
            1,
            7,
            1,
            7,
            7,
            1,
            7,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            1,
            1,
            4,
            23,
            2,
            22,
            27,
            2,
            4,
            3,
            2,
            -1,
            1,
            4,
            1,
            1,
            4,
            -1,
            1,
            17,
            -1,
            4,
            13,
            -1,
            2,
            12,
            1,
            18,
            18,
            1,
            1,
            1,
            4,
            23,
            2,
            22,
            27,
            2,
            4,
            3,
            6,
            1,
            4,
            10,
            4,
            7,
            10,
            1,
            7,
            8,
            -1,
            10,
            5,
            1,
            4,
            10,
            -1,
            5,
            13,
            1,
            -1,
            1,
            1,
            10,
            4,
            10,
            5,
            10,
            -1,
            10,
            4,
            1,
            1,
            -1,
            -1,
            1,
            1,
            -1,
            -1,
            8,
            -1,
            10,
            5,
            1,
            4,
            10,
            -1,
            5,
            13,
            1,
            -1,
            1,
            1,
            10,
            10,
            10,
            5,
            13,
            -1,
            13,
            12,
            11,
            11,
            1,
            1,
            11,
            11,
            1,
            1,
            8,
            -1,
            10,
            5,
            1,
            10,
            10,
            -1,
            21,
            27,
            1,
            1,
            7,
            7,
            26,
            2,
            26,
            21,
            5,
            1,
            5,
            10,
            1,
            7,
            1,
            1,
            1,
            7,
            -1,
            -1,
            8,
            -1,
            10,
            5,
            1,
            10,
            10,
            -1,
            21,
            27,
            1,
            1,
            7,
            7,
            26,
            2,
            26,
            21,
            5,
            1,
            5,
            13,
            11,
            19,
            4,
            4,
            11,
            19,
            1,
            1,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            -1,
            1,
            4,
            13,
            4,
            10,
            5,
            10,
            1,
            2,
            2,
            1,
            1,
            1,
            -1,
            4,
            4,
            -1,
            1,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            -1,
            1,
            4,
            13,
            10,
            10,
            5,
            13,
            1,
            6,
            6,
            11,
            11,
            7,
            1,
            12,
            12,
            1,
            7,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            1,
            7,
            10,
            27,
            2,
            26,
            21,
            5,
            4,
            3,
            2,
            1,
            7,
            4,
            1,
            4,
            10,
            -1,
            1,
            8,
            -1,
            10,
            5,
            1,
            2,
            13,
            1,
            20,
            18,
            4,
            1,
            7,
            10,
            27,
            2,
            26,
            21,
            5,
            4,
            3,
            6,
            11,
            19,
            10,
            4,
            12,
            13,
            1,
            7,
            0,
            1,
            2,
            2,
            1,
            10,
            2,
            1,
            6,
            6,
            1,
            1,
            1,
            1,
            2,
            19,
            2,
            2,
            19,
            1,
            13,
            10,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            0,
            1,
            2,
            2,
            1,
            10,
            2,
            1,
            6,
            6,
            1,
            1,
            1,
            1,
            2,
            24,
            2,
            2,
            24,
            1,
            27,
            26,
            28,
            28,
            28,
            28,
            28,
            28,
            28,
            28,
            0,
            1,
            2,
            2,
            1,
            13,
            2,
            1,
            14,
            14,
            1,
            11,
            11,
            11,
            16,
            15,
            16,
            16,
            15,
            11,
            18,
            13,
            1,
            11,
            11,
            11,
            1,
            11,
            1,
            1,
            0,
            1,
            2,
            2,
            1,
            13,
            2,
            1,
            14,
            14,
            1,
            11,
            11,
            11,
            16,
            15,
            16,
            16,
            15,
            11,
            18,
            27,
            28,
            25,
            25,
            25,
            28,
            25,
            28,
            28,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            1,
            1,
            7,
            6,
            19,
            2,
            6,
            19,
            7,
            5,
            5,
            1,
            1,
            7,
            1,
            7,
            7,
            1,
            7,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            1,
            1,
            7,
            6,
            24,
            2,
            6,
            24,
            7,
            21,
            21,
            28,
            28,
            29,
            28,
            29,
            29,
            28,
            29,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            11,
            11,
            19,
            14,
            15,
            16,
            14,
            15,
            19,
            20,
            5,
            1,
            11,
            19,
            11,
            7,
            19,
            1,
            7,
            0,
            1,
            2,
            6,
            1,
            5,
            6,
            7,
            9,
            9,
            7,
            11,
            11,
            19,
            14,
            15,
            16,
            14,
            15,
            19,
            20,
            21,
            28,
            25,
            24,
            25,
            29,
            24,
            28,
            29,
            0,
            1,
            2,
            3,
            4,
            10,
            2,
            1,
            3,
            6,
            4,
            1,
            4,
            4,
            2,
            19,
            2,
            3,
            13,
            1,
            13,
            10,
            4,
            4,
            1,
            1,
            4,
            4,
            1,
            1,
            0,
            1,
            2,
            3,
            4,
            10,
            2,
            1,
            3,
            6,
            4,
            1,
            4,
            4,
            2,
            24,
            2,
            3,
            27,
            1,
            27,
            26,
            22,
            22,
            28,
            28,
            22,
            22,
            28,
            28,
            0,
            1,
            2,
            3,
            4,
            13,
            2,
            1,
            17,
            14,
            4,
            11,
            12,
            12,
            16,
            15,
            16,
            17,
            18,
            11,
            18,
            13,
            4,
            12,
            11,
            11,
            4,
            12,
            1,
            1,
            0,
            1,
            2,
            3,
            4,
            13,
            2,
            1,
            17,
            14,
            4,
            11,
            12,
            12,
            16,
            15,
            16,
            17,
            18,
            11,
            18,
            27,
            22,
            23,
            25,
            25,
            22,
            23,
            28,
            28,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            1,
            4,
            10,
            6,
            19,
            2,
            3,
            13,
            7,
            5,
            5,
            4,
            4,
            7,
            1,
            10,
            10,
            1,
            7,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            1,
            4,
            10,
            6,
            24,
            2,
            3,
            27,
            7,
            21,
            21,
            22,
            22,
            29,
            28,
            26,
            26,
            28,
            29,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            5,
            4,
            12,
            19,
            11,
            10,
            13,
            1,
            7,
            0,
            1,
            2,
            3,
            4,
            5,
            6,
            7,
            8,
            9,
            10,
            11,
            12,
            13,
            14,
            15,
            16,
            17,
            18,
            19,
            20,
            21,
            22,
            23,
            24,
            25,
            26,
            27,
            28,
            29
        )
    )
    private val d_increments: Array<IntArray> = arrayOf<IntArray>(
        intArrayOf(0, 0, 0),
        intArrayOf(0, 0, 0, 0, 0, 1, 1, 1, 1, 1),
        intArrayOf(
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
        ),
        intArrayOf(
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            3,
            3,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            3,
            3,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
        ),
        intArrayOf(
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            0,
            4,
            0,
            0,
            4,
            4,
            2,
            2,
            0,
            4,
            4,
            4,
            0,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            3,
            3,
            3,
            0,
            0,
            3,
            0,
            3,
            3,
            0,
            3,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            4,
            4,
            3,
            0,
            4,
            0,
            0,
            4,
            3,
            3,
            3,
            0,
            4,
            3,
            4,
            3,
            3,
            0,
            3,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            2,
            2,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            4,
            2,
            2,
            2,
            2,
            4,
            4,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            4,
            2,
            2,
            0,
            3,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
        ),
        intArrayOf(
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            2,
            2,
            5,
            5,
            5,
            5,
            5,
            5,
            5,
            5,
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            0,
            4,
            0,
            0,
            4,
            4,
            2,
            2,
            0,
            4,
            4,
            4,
            0,
            4,
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            0,
            0,
            0,
            0,
            0,
            4,
            4,
            4,
            0,
            4,
            0,
            0,
            4,
            4,
            2,
            2,
            5,
            4,
            4,
            4,
            5,
            4,
            5,
            5,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            3,
            3,
            3,
            0,
            0,
            3,
            0,
            3,
            3,
            0,
            3,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            3,
            3,
            3,
            5,
            5,
            3,
            5,
            3,
            3,
            5,
            3,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            4,
            4,
            3,
            0,
            4,
            0,
            0,
            4,
            3,
            3,
            3,
            0,
            4,
            3,
            4,
            3,
            3,
            0,
            3,
            0,
            0,
            0,
            0,
            0,
            3,
            0,
            3,
            0,
            0,
            3,
            4,
            4,
            3,
            0,
            4,
            0,
            0,
            4,
            3,
            3,
            3,
            5,
            4,
            3,
            4,
            3,
            3,
            5,
            3,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            2,
            2,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            2,
            2,
            5,
            5,
            2,
            2,
            5,
            5,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            4,
            2,
            2,
            2,
            2,
            4,
            4,
            2,
            2,
            0,
            0,
            0,
            0,
            0,
            0,
            2,
            2,
            0,
            0,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            4,
            2,
            2,
            2,
            2,
            4,
            4,
            2,
            2,
            5,
            5,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            0,
            2,
            2,
            0,
            3,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            5,
            2,
            2,
            5,
            3,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            4,
            2,
            2,
            0,
            3,
            0,
            0,
            0,
            0,
            2,
            3,
            0,
            3,
            0,
            0,
            2,
            4,
            2,
            2,
            0,
            4,
            0,
            0,
            2,
            3,
            3,
            3,
            2,
            2,
            3,
            4,
            2,
            2,
            5,
            3,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1,
            1
        )
    )
    private val d_maxOffsetErrors: IntArray =
        intArrayOf(2, 0, 1, 2, 1, 3, 2, 2, 3, 3, 2, 3, 3, 3, 3, 4, 3, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4)
    private val d_nStates = 30
}
